/**
 *  Copyright 25.08.2012 oliver.keusemann@googlemail.com
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package de.xelerity.geolessi.types.mixed;

import java.io.Serializable;

public class SectorClusterDef implements Serializable {

	private static final long serialVersionUID = -185912070545570452L;
	int SpanXStart;
	int SpanYStart;
	int SpanXEnd;
	int SpanYEnd;
	int SpanXCnt;
	int SpanYCnt;

	public SectorClusterDef(int SpanXStart, int SpanXEnd, int SpanYStart, int SpanYEnd) {
		this.SpanXStart = SpanXStart;
		this.SpanYStart = SpanYStart;
		this.SpanXEnd = SpanXEnd;
		this.SpanYEnd = SpanYEnd;
		this.SpanXCnt = Math.abs(SpanXEnd - SpanXStart + 1);
		this.SpanYCnt = Math.abs(SpanYEnd - SpanYStart + 1);

	}

	public long getSectorAnzahl() {
		return Math.abs(SpanXCnt * SpanYCnt);
	}

	public int getSpanXStart() {
		return SpanXStart;
	}

	public void setSpanXStart(int spanXStart) {
		SpanXStart = spanXStart;
	}

	public int getSpanYStart() {
		return SpanYStart;
	}

	public void setSpanYStart(int spanYStart) {
		SpanYStart = spanYStart;
	}

	public int getSpanXEnd() {
		return SpanXEnd;
	}

	public void setSpanXEnd(int spanXEnd) {
		SpanXEnd = spanXEnd;
	}

	public int getSpanYEnd() {
		return SpanYEnd;
	}

	public void setSpanYEnd(int spanYEnd) {
		SpanYEnd = spanYEnd;
	}

	public int getSpanXCnt() {
		return SpanXCnt;
	}

	public void setSpanXCnt(int spanXCnt) {
		SpanXCnt = spanXCnt;
	}

	public int getSpanYCnt() {
		return SpanYCnt;
	}

	public void setSpanYCnt(int spanYCnt) {
		SpanYCnt = spanYCnt;
	}

}
